#ifndef CLIENTSOCKET_H
#define CLIENTSOCKET_H

#include <QSslSocket>
#include <QByteArray>

class ClientSocket : public QSslSocket
{
    Q_OBJECT
private:
	class ClientSocketPrivate;
	ClientSocketPrivate *d;
public:
    explicit ClientSocket(QObject *parent = 0);
	~ClientSocket();

	bool isAuthorized() const;
	quint64 userId() const;
private slots:
	void readPartOfData();
signals:
	void dataReaded(ClientSocket*, QByteArray);

public slots:
	void setAutorized(bool flag);
	void setUserId(quint64 id);
};

#endif // CLIENTSOCKET_H
